All Questions
3 questions
65votes
10answers
21kviews
I never use pointers in my C++ code. Am I coding C++ wrong? [closed]
This question may sound strange to you, but I am learning C++ all by myself. I have nobody whom I could ask for mentoring and I would be very glad for some advice. I have started recently to program ...
4votes
4answers
1kviews
When should a function take a pointer for a collection to fill vs returning a pointer with a filled collection?
In C++ I frequently see these two signatures used seemingly interchangeably: void fill_array(Array<Type>* array_to_fill); Array<Type>* filled_array(); I imagine there is a subtle ...
12votes
4answers
2kviews
If you favor "T *var", do you ever write "T*"? [duplicate]
Possible Duplicate: int* i; or int *i; or int * i; Thinking about where we place our asterisks; how do those that prefer to keep the "pointerness" away from the type and with the identifier (int *...